package org.liang.job.repository.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.liang.job.beans.JobInfo;
import org.springframework.jdbc.core.RowMapper;

/**
 * 任务信息行映射器.
 *
 * @author L.Yang
 * @version 1.0, 2015年10月21日
 */
public class JobInfoRowMapper implements RowMapper<JobInfo> {

    @Override
    public JobInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
        JobInfo job = new JobInfo();
        job.setId(rs.getString("ID"));
        job.setTitle(rs.getString("TITLE"));
        job.setName(rs.getString("NAME"));
        job.setGroup(rs.getString("GROUP_ID"));
        job.setGroupName(rs.getString("GROUP_NAME"));
        job.setBiz(rs.getString("BIZ"));
        return job;
    }

}
